package checkers;

import java.util.List;
import java.util.Observable;

public abstract class CheckersGUI extends Observable {

    protected CheckersMovement lastUserChosenMovement;
    protected int topAISmartnessLevel;
    public static final byte NOTIFY_USER_HAS_CHOOSED_MOVEMENT = 1;
    public static final byte NOTIFY_NEW_GAME = 2;
    public static final byte NOTIFY_SMARTNESS_LEVEL_CHANGED = 3;

    public void notificationFromGUI(Object arg) {
        this.setChanged();
        notifyObservers(arg);
    }

    public CheckersMovement getLastUserChosenMovement() {
        return lastUserChosenMovement;
    }

    public int getTopAISmartnessLevel() {
        return topAISmartnessLevel;
    }

    public void setTopAISmartnessLevel(int topAISmartnessLevel) {
        this.topAISmartnessLevel = topAISmartnessLevel;
    }

    public abstract void showBoard(CheckersState checkersState);

    public abstract void requestUserMovement(List<CheckersMovement> avaiableMovements);

    public abstract void showMovement(CheckersMovement movement);

    public abstract void showAIProcessing(boolean aiProcessing);

    public abstract void showGameEndedMessage(byte playerWhoWon);
}
